<!easy-html>
<config: ai-style="modern-terminal" theme="dark" />
<head: title="Linux Terminal Simulator" />

<body: layout="flex-center" bg="#1e1e1e" padding="2rem">
  <terminal: id="term" 
             width="90vw" height="80vh" 
             font-family="monospace" 
             box-shadow="0 0 30px #0ff3" 
             border-radius="10px">
    
    <header: bg="linear-gradient(#333, #222)" padding="0.5rem">
      <span: color="#0ff">user@linux:</span>
      <span: id="path-display" color="#0f0">~</span>
      <span: color="#0ff">$</span>
    </header>
    
    <output: id="output" height="calc(100% - 2.5rem)" 
             overflow="auto" padding="1rem">
      Welcome to Linux Terminal Simulator (easy-html)
      Type 'help' for available commands
    </output>
    
    <input: id="cmd-input" type="text" width="100%" 
            placeholder="Enter command..." 
            auto-focus
            on-enter="executeCommand">
  </terminal>
  
  <script:>
    // 文件系统和命令实现类似HTML5版本
    // 但使用更简洁的语法
    const fs = {
      '/': dir(home: dir(
        user: dir(
          documents: dir(),
          downloads: dir(),
          'test.txt': file('Hello World')
        )
      ))
    }
    
    func executeCommand(cmd) {
      ai.terminal.execute(cmd, fs)
      updatePathDisplay()
    }
  </script>
</body>